Summary of Ink Objects
Constants and Data Types
The Ink Object
typedef struct gxPrivateInkRecord *gxInk;Ink Attributes
enum gxInkAttributes{ gxPortAlignDitherInk = 0x0001, gxForceDitherInk = 0x0002, gxSuppressDitherInk = 0x0004, gxSuppressHalftoneInk= 0x0008 }; typedef long gxInkAttribute;The Color Structure
struct gxColor{ gxColorSpace space; gxColorProfile profile; union { gxCMYKColor cmyk; gxRGBColor rgb; gxRGBAColor rgba; gxHSVColor hsv; gxHLSColor hls; gxCIEColor cie; gxYIQColor yiq; gxColorValue gray; gxGrayAColor graya; unsigned short pixel16; unsigned long pixel32; gxIndexedColor indexed; gxColorValue component[4]; } element; }; typedef unsigned char gxComponentMode;The Transfer Mode Structure
struct gxTransferMode{ gxColorSpace space; gxColorSet set; gxColorProfile profile; Fixed sourceMatrix[5][4]; Fixed deviceMatrix[5][4]; Fixed resultMatrix[5][4]; gxTransferFlag flags; struct gxTransferComponent component[4]; };Transfer Mode Flags
enum gxTransferFlags{ gxRejectSourceTransfer = 0x0001, /* At least one source component must be out of range */ gxRejectDeviceTransfer = 0x0002, /* At least one device component must be out of range */ gxSingleComponentTransfer= 0x0004 /* duplicate gxTransferComponent[0] for all components in transfer */ }; typedef long gxTransferFlag;The Transfer Component Structure
struct gxTransferComponent{ gxComponentMode mode; gxComponentFlag flags; gxColorValue sourceMinimum; gxColorValue sourceMaximum; gxColorValue deviceMinimum; gxColorValue deviceMaximum; gxColorValue clampMinimum; gxColorValue clampMaximum; gxColorValue operand; };Component Modes
enum gxComponentModes{ gxNoMode = 0, gxCopyMode, gxAddMode, gxBlendMode, gxMigrateMode, gxMinimumMode, gxMaximumMode, gxHighlightMode, gxAndMode, gxOrMode, gxXorMode, gxRampAndMode, gxRampOrMode, gxRampXorMode, gxOverMode, gxAtopMode, gxExcludeMode, gxFadeMode };Transfer Component Flags
enum gxComponentFlags{ gxOverResultComponent= 0x01, /* AND the result component with 0xFFFF before clamping */ gxReverseComponent = 0x02 /* Reverse source and device components before applying transfer mode */ }; typedef unsigned char gxComponentFlag;Functions
Creating and Manipulating Ink Objects
gxInk GXNewInk (void); void GXDisposeInk (gxInk target); gxInk GXCopyToInk (gxInk target, gxInk source); boolean GXEqualInk (gxInk one, gxInk two); gxInk GXCloneInk (gxInk source);Manipulating Ink Object Properties
void GXResetInk (gxInk target); gxInkAttribute GXGetInkAttributes (gxInk source); void GXSetInkAttributes (gxInk target, gxInkAttribute attributes); gxInkAttribute GXGetShapeInkAttributes (gxShape source); void GXSetShapeInkAttributes (gxShape target, gxInkAttribute attributes); long GXGetInkOwners (gxInk source); long GXGetInkTags (gxInk source, long tagType, long index, long count, gxTag items[]); void GXSetInkTags (gxInk target, long tagType, long index, long oldCount, long newCount, const gxTag items[]);Getting and Setting an Ink's Color
gxColor *GXGetInkColor (gxInk source, gxColor *data); void GXSetInkColor (gxInk target, const gxColor *data); gxColor *GXGetShapeColor (gxShape source, gxColor *data); void GXSetShapeColor (gxShape target, const gxColor *data);Getting and Setting an Ink's Transfer Mode
gxTransferMode *GXGetInkTransfer (gxInk source, gxTransferMode *data); void GXSetInkTransfer (gxInk target, const gxTransferMode *data); gxTransferMode *GXGetShapeTransfer (gxShape source, gxTransferMode *data); void GXSetShapeTransfer (gxShape target, const gxTransferMode *data);